﻿<%@ page language="C#" masterpagefile="~/Commons/Main.master" autoeventwireup="true" inherits="Wage_List, App_Web_0ivef3g5" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="Server">

    <style>
        .report{text-align:left !important;}
    </style>

      <div class="content-wrapper">

        <section class="content-header">
          <h1>
            薪资管理
          </h1>
          <ol class="breadcrumb">
            <li><a href="../"><i class="fa fa-home"></i> 首页</a></li>
            <li class="active">薪资管理</li>
          </ol>
        </section>

        <section class="content">

          <div class="row">
            <div class="col-xs-12">
              <div class="box">
                <div class="box-header no-print">
                  <h3 class="box-title">
                      <asp:HyperLink ID="hlAdd" runat="server"><span class="label label-success"><i class="fa fa-plus"></i> 新增</span></asp:HyperLink>
                      <asp:HyperLink ID="hlBatch" runat="server"><span class="label label-success"><i class="fa fa-plus"></i> 批量新增</span></asp:HyperLink>
                      <asp:HyperLink ID="hlPrint" runat="server" NavigateUrl="javascript:McPrint();"><span class="label label-primary"><i class="fa fa-print"></i> 打印</span></asp:HyperLink>
                      <asp:LinkButton ID="lnbExcel" runat="server" OnClick="lnbExcel_Click"><span class="label label-success"><i class="fa fa-file-excel-o"></i> 导出</span></asp:LinkButton>
                      <asp:HyperLink ID="hlExport" runat="server" NavigateUrl="#ExportDiv" CssClass="fancybox" ToolTip="导入"><span class="label label-primary"><i class="fa fa-mail-reply"></i> 导入</span></asp:HyperLink>
                      <asp:LinkButton ID="lnbPrev" runat="server" OnClick="lnbPrev_Click"><span class="label label-back"><i class="fa fa-chevron-left"></i> 上一月</span></asp:LinkButton>
                      <asp:LinkButton ID="lnbNext" runat="server" OnClick="lnbNext_Click"><span class="label label-back"><i class="fa fa-chevron-right"></i> 下一月</span></asp:LinkButton>
                      <asp:Label ID="lblDate" runat="server"></asp:Label>，薪资总额：
                      <asp:Label ID="lblTotal" runat="server"></asp:Label>
                  </h3>
                  <div class="box-tools">
                    <div class="input-group" style="width: 150px;">
                      <asp:TextBox ID="txtKeyword" runat="server" CssClass="form-control input-sm pull-right" placeholder="查找..."></asp:TextBox>
                      <div class="input-group-btn">
                        <asp:LinkButton ID="lnbSearch" runat="server" CssClass="btn btn-sm btn-default" onclick="lnbSearch_Click"><i class="fa fa-search"></i></asp:LinkButton>
                      </div>
                    </div>
                  </div>
                </div>
                <div class="box-body table-responsive no-padding">
                
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" GridLines="None" BorderWidth="0px" CssClass="table table-hover report-tb" AllowSorting="True" OnSorting="GridView1_Sorting" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand" OnRowCreated="GridView1_RowCreated">
                        <Columns>
                            <asp:TemplateField HeaderText="ID" Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="lblID" runat="server" Text='<%# Bind("pk_Wage") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="id" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="部门" SortExpression="DepartmentName">
                                <ItemTemplate>
                                    <asp:Label ID="lblDepartmentName" runat="server" Text='<%# Bind("DepartmentName") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="姓名" SortExpression="FullName">
                                <ItemTemplate>
                                    <asp:Label ID="lblFullName" runat="server" Text='<%# Bind("FullName") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="职位" SortExpression="TitleName">
                                <ItemTemplate>
                                    <asp:Label ID="lblTitleName" runat="server" Text='<%# Bind("TitleName") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="基本工资" SortExpression="BaseWage">
                                <ItemTemplate>
                                    <asp:Label ID="lblBaseWage" runat="server" Text='<%# Bind("BaseWage") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="工作天数" SortExpression="WorkDays">
                                <ItemTemplate>
                                    <asp:Label ID="lblWorkDays" runat="server" Text='<%# Bind("WorkDays") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="加班工资" SortExpression="OTWage">
                                <ItemTemplate>
                                    <asp:Label ID="lblOTWage" runat="server" Text='<%# Bind("OTWage") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="加班天数" SortExpression="OTDays">
                                <ItemTemplate>
                                    <asp:Label ID="lblOTDays" runat="server" Text='<%# Bind("OTDays") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="绩效工资" SortExpression="PerformanceWage">
                                <ItemTemplate>
                                    <asp:Label ID="lblPerformanceWage" runat="server" Text='<%# Bind("PerformanceWage") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="补发工资" SortExpression="ReissueWage">
                                <ItemTemplate>
                                    <asp:Label ID="lblReissueWage" runat="server" Text='<%# Bind("ReissueWage") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="提成" SortExpression="Commission">
                                <ItemTemplate>
                                    <asp:Label ID="lblCommission" runat="server" Text='<%# Bind("Commission") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="奖金" SortExpression="Bonus">
                                <ItemTemplate>
                                    <asp:Label ID="lblBonus" runat="server" Text='<%# Bind("Bonus") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="社保" SortExpression="SocialSecurity">
                                <ItemTemplate>
                                    <asp:Label ID="lblSocialSecurity" runat="server" Text='<%# Bind("SocialSecurity") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="公积金" SortExpression="AccumulationFund">
                                <ItemTemplate>
                                    <asp:Label ID="lblAccumulationFund" runat="server" Text='<%# Bind("AccumulationFund") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="个税" SortExpression="IncomeTax">
                                <ItemTemplate>
                                    <asp:Label ID="lblIncomeTax" runat="server" Text='<%# Bind("IncomeTax") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="扣款" SortExpression="Deductions">
                                <ItemTemplate>
                                    <asp:Label ID="lblDeductions" runat="server" Text='<%# Bind("Deductions") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="应发工资" SortExpression="TotalWage">
                                <ItemTemplate>
                                    <asp:Label ID="lblTotalWage" runat="server" Text='<%# Bind("TotalWage") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle CssClass="report" />
                                <ItemStyle CssClass="report" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="操作">
                                <ItemTemplate>
                                    <asp:HyperLink ID="gvEdit" runat="server" ToolTip="修改"><span class="label label-primary"><i class="fa fa-edit"></i> 修改</span></asp:HyperLink>
                                    <asp:LinkButton ID="gvDelete" runat="server" ToolTip="删除" CommandName="_delete"><span class="label label-danger"><i class="fa fa-remove"></i> 删除</span></asp:LinkButton>
                                </ItemTemplate>
                                <HeaderStyle CssClass="no-print" />
                                <ItemStyle CssClass="no-print" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>

                </div>
                
              </div>
            </div>
          </div>

        </section>

      </div>
    
      <div id="ExportDiv" style="display:none; width:500px;">
            
        <div class="box-body">
            
            <div class="col-md-12 form-group" style="padding:0px 15px">
            <div class="form-group">
                <div class="btn btn-default btn-file">
                    <i class="fa fa-upload"></i> 选择Excel文件
                    <asp:FileUpload ID="fuExcel" runat="server" onchange="ChkUpload(this);" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"></asp:FileUpload>
                    <span id="filepath"></span>
                </div>
            </div>
            </div>
                        
            <div class="pull-right">
                <span class="tips">导入Excel以导出的格式为准</span>&nbsp;&nbsp;&nbsp;
                <asp:LinkButton ID="lnbExport" runat="server" CssClass="btn btn-primary" onclick="lnbExport_Click" OnClientClick="{return confirm('确定导入吗？');}">导入</asp:LinkButton>
            </div>

        </div>

      </div>
    
</asp:Content>